package service;

import beans.Registration;
import java.util.logging.Level;
import java.util.logging.Logger;
import jdbc.MyJdbc;

public class RegistrateService {

    public RegistrateService() {
    }

    public void Registrate(Registration registrate) {
        try {
            String sql = "insert into Registration value(?,?)";
            MyJdbc jdbc = new MyJdbc();
            jdbc.getConnection();
            jdbc.update(sql,registrate.getId(),registrate.getTime());
            jdbc.close();
        } catch (Exception ex) {
            Logger.getLogger(RegistrateService.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
